import { Link, useNavigate } from "react-router-dom";
const Login = () => {
   const navigate = useNavigate();
  return (
    <>
      <div>这是登录页面</div>
      <p><Link to="/articles">文章页面(Link)</Link></p>
      <p><button onClick={()=>{navigate('/articles')}}>文章页面(useNavigate)</button></p>
      <p><button onClick={()=>{navigate('/articles?id=123')}}>传参searchParams</button></p>
      <p><button onClick={()=>{navigate('/articles/123')}}>传参userParams</button></p>
    </>
)
};

export default Login;